Function |is_negative

std/ops/num::|is_negative


Usage

|is_negative<N>(value)

Generics

◻ N: Signed

Parameters

↳ value: N

Return

↴ bool


Tells if a value is negative.

Returns true for strictly negative integers, and false for 0 and positive ones.
ℹ️ For floating types (f32 and f64), NaN values gives false, -INFINITY and -0.0 gives true.